<template></template>
<script setup>
import * as Cesium from 'cesium'
import { onMounted, ref, defineExpose } from 'vue'
import SimpleMaterialProperty from './WaveMaterialProperity.js'

function initCesiumWave(Viewer) {
    const position = Cesium.Cartesian3.fromDegrees(116.39, 39.9, 0)

    // 创建一个使用简单着色器材质的实体
    const en = Viewer.entities.add({
        position: position,
        ellipse: {
            semiMinorAxis: 500,
            semiMajorAxis: 500,
            material: new SimpleMaterialProperty({
                duration: 4000,
                color: "#00FF00" // 绿色
            })
        }
    })

    Viewer.flyTo(en)
}

defineExpose({
    initCesiumWave
})
</script>
<style scoped></style>